package com.dao.qsl;

import com.bean.qsl.YdInfo;
import com.util.qsl.Dbutil;
import org.springframework.stereotype.Repository;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;

@Repository
public class YdXx {
      public List<YdInfo> getydxx(){
	  Dbutil d=new Dbutil();
	  Connection c=null;




	  List<YdInfo> list =new ArrayList<>();
	  try {
	        c=d.getConnection();

	     Statement st= c.createStatement();

		 String sql="SELECT * FROM service";

	        ResultSet rs=st.executeQuery(sql);

	        while (rs.next()) {
		    YdInfo y=new YdInfo();

		    y.setFwbh(rs.getString("fwbh"));
		    y.setFwmc(rs.getString("fwmc"));
		    y.setXqmc(rs.getString("xqmc"));
		    y.setYdrs(rs.getString("ydrs"));
		    y.setFwsl(rs.getString("fwsl"));
		    y.setKssj(rs.getString("kssj"));
		    y.setJssj(rs.getString("jssj"));

		    list.add(y);
	        }

	  }catch(Exception e){
	        e.printStackTrace();
	  }
	  return list;
      }
}
